﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script src="/Contents/scripts/jquery-1.8.0.min.js" type="text/javascript"></script>
        <script src="/Contents/scripts/functions.js" type="text/javascript"></script>
        <link href="/Contents/css/glassbtn.css" rel="stylesheet" type="text/css" />
        <style type="text/css">
            .left{float:left; width:70px; text-align:right;font-family:微软雅黑;color:#444444;line-height:26px;margin-bottom:12px;}
            .right{float:left;}
            
            .area{border:1px solid #ccc; height:70px; width:350px;text-indent:5px;margin-bottom:12px;}
            .area:hover{border:1px solid #88C5EE; height:70px; width:500px; text-indent:5px;}
            
            .shuru{border:1px solid #ccc; height:23px; width:350px;line-height:23px; text-indent:5px;margin-bottom:12px;}
            .shuru:hover{border:1px solid #88C5EE; height:23px; line-height:23px; text-indent:5px;}
            
            .answer_key{font-family:微软雅黑;width:65px;height:26px;line-height:26px;float:left;}
        </style>
    </head>
    <body style="padding-left:5px;padding-top:5px;">
        <div style="float:left;" >
            <div class="left">题目：</div>
            <div class="right">
                <textarea class="area" id="title" style="width:350px; height:60px;"></textarea>
            </div>
            <div class="left">选项A：</div>
            <div class="right">
                <input type="text" class="shuru" id="answer_a" />
            </div>
            <div class="left">选项B：</div>
            <div class="right">
                <input type="text" class="shuru" id="answer_b" />
            </div>
            <div class="left">选项C：</div>
            <div class="right">
                <input type="text" class="shuru" id="answer_c" />
            </div>
            <div class="left">选项D：</div>
            <div class="right">
                <input type="text" class="shuru" id="answer_d" />
            </div>
            <table>
            <tr><td>
                    <div class="left">答案：</div>
                    <div class="right" style=" display:inline" id="key_div">
                        <div class="answer_key"><input type="checkbox" value="A" id="key_a" /><label for="key_a">&nbsp;A&nbsp;</label></div>
                        <div class="answer_key"><input type="checkbox" value="B" id="key_b" /><label for="key_b">&nbsp;B&nbsp;</label></div>
                        <div class="answer_key"><input type="checkbox" value="C" id="key_c" /><label for="key_c">&nbsp;C&nbsp;</label></div>
                        <div class="answer_key"><input type="checkbox" value="D" id="key_d" /><label for="key_d">&nbsp;D&nbsp;</label></div>
                        <div class="answer_key"><input type="checkbox" value="E" id="key_e" checked="checked"/><label for="key_e">不限</label></div>
                    </div>
             </td></tr>
             </table>
            <div class="left">解析：</div>
            <div class="right">
                <textarea class="area" id="analysis" style="width:350px; height:60px;"></textarea>
            </div>
        </div> 
        <div style="float:left;">
            <input type="button" class="greenbtn" style="width:70px;margin-left:140px;margin-top:15px;" value="查询" name="query_btn" onclick="queryMultiple()"/>
        </div>
        <div style="float:left;">
            <input type="button" class="greenbtn" style="width:70px;margin-top:15px;margin-left:35px;" value="取消" name="cancel_btn" onclick="fr_all_closeForm()" />
         </div>
        <script type="text/javascript">
            $(document).ready(function () {
                $("#title").focus();
            })
            function fr_all_closeForm() {
                parent.closeShade();
            }
            function queryMultiple() {
                var title = trim($("#title").val());
                var a = trim($("#answer_a").val());
                var b = trim($("#answer_b").val());
                var c = trim($("#answer_c").val());
                var d = trim($("#answer_d").val());

                // 获取答案
                var inputs = document.getElementById("key_div").getElementsByTagName("input");
                var keys = "";
                for (var i = 0; i < inputs.length; i++) {
                    if ((inputs[i].type = "checkbox") && (inputs[i].checked == true)) {
                        keys += inputs[i].value + "、";
                    }
                }

                var analysis = trim($("#analysis").val());
                parent.reload_Multiple_DG_WithQuery(title, a, b, c, d, keys, analysis);
            }
        </script>
    </body>
</html>
